Optimal. Leaf size=136 \[ -\frac {x^2 \left (a \left (B-\frac {a D}{b}\right )-(A b-a C) x\right )}{4 a b \left (a+b x^2\right )^2}-\frac {x (A b+3 a C-2 (b B-3 a D) x)}{8 a b^2 \left (a+b x^2\right )}+\frac {(A b+3 a C) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{8 a^{3/2} b^{5/2}}+\frac {D \log \left (a+b x^2\right )}{2 b^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.11, antiderivative size = 136, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {1818, 649, 211,
266} \begin {gather*} \frac {(3 a C+A b) \text {ArcTan}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{8 a^{3/2} b^{5/2}}-\frac {x (-2 x (b B-3 a D)+3 a C+A b)}{8 a b^2 \left (a+b x^2\right )}-\frac {x^2 \left (a \left (B-\frac {a D}{b}\right )-x (A b-a C)\right )}{4 a b \left (a+b x^2\right )^2}+\frac {D \log \left (a+b x^2\right )}{2 b^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 266
Rule 649
Rule 1818
Rubi steps
\begin {align*} \int \frac {x^2 \left (A+B x+C x^2+D x^3\right )}{\left (a+b x^2\right )^3} \, dx &=-\frac {x^2 \left (a \left (B-\frac {a D}{b}\right )-(A b-a C) x\right )}{4 a b \left (a+b x^2\right )^2}-\frac {\int \frac {x \left (-2 a \left (B-\frac {a D}{b}\right )-(A b+3 a C) x-4 a D x^2\right )}{\left (a+b x^2\right )^2} \, dx}{4 a b}\\ &=-\frac {x^2 \left (a \left (B-\frac {a D}{b}\right )-(A b-a C) x\right )}{4 a b \left (a+b x^2\right )^2}-\frac {x (A b+3 a C-2 (b B-3 a D) x)}{8 a b^2 \left (a+b x^2\right )}+\frac {\int \frac {a (A b+3 a C)+8 a^2 D x}{a+b x^2} \, dx}{8 a^2 b^2}\\ &=-\frac {x^2 \left (a \left (B-\frac {a D}{b}\right )-(A b-a C) x\right )}{4 a b \left (a+b x^2\right )^2}-\frac {x (A b+3 a C-2 (b B-3 a D) x)}{8 a b^2 \left (a+b x^2\right )}+\frac {(A b+3 a C) \int \frac {1}{a+b x^2} \, dx}{8 a b^2}+\frac {D \int \frac {x}{a+b x^2} \, dx}{b^2}\\ &=-\frac {x^2 \left (a \left (B-\frac {a D}{b}\right )-(A b-a C) x\right )}{4 a b \left (a+b x^2\right )^2}-\frac {x (A b+3 a C-2 (b B-3 a D) x)}{8 a b^2 \left (a+b x^2\right )}+\frac {(A b+3 a C) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{8 a^{3/2} b^{5/2}}+\frac {D \log \left (a+b x^2\right )}{2 b^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 122, normalized size = 0.90 \begin {gather*} \frac {\frac {-2 a^2 D-2 A b^2 x+2 a b (B+C x)}{\left (a+b x^2\right )^2}+\frac {8 a^2 D+A b^2 x-a b (4 B+5 C x)}{a \left (a+b x^2\right )}+\frac {\sqrt {b} (A b+3 a C) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{a^{3/2}}+4 D \log \left (a+b x^2\right )}{8 b^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.11, size = 123, normalized size = 0.90
method | result | size |
default | \(\frac {\frac {\left (A b -5 a C \right ) x^{3}}{8 a b}-\frac {\left (B b -2 a D\right ) x^{2}}{2 b^{2}}-\frac {\left (A b +3 a C \right ) x}{8 b^{2}}-\frac {a \left (B b -3 a D\right )}{4 b^{3}}}{\left (b \,x^{2}+a \right )^{2}}+\frac {\frac {4 a D \ln \left (b \,x^{2}+a \right )}{b}+\frac {\left (A b +3 a C \right ) \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b}}}{8 a \,b^{2}}\) | \(123\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.53, size = 146, normalized size = 1.07 \begin {gather*} \frac {6 \, D a^{3} - 2 \, B a^{2} b - {\left (5 \, C a b^{2} - A b^{3}\right )} x^{3} + 4 \, {\left (2 \, D a^{2} b - B a b^{2}\right )} x^{2} - {\left (3 \, C a^{2} b + A a b^{2}\right )} x}{8 \, {\left (a b^{5} x^{4} + 2 \, a^{2} b^{4} x^{2} + a^{3} b^{3}\right )}} + \frac {D \log \left (b x^{2} + a\right )}{2 \, b^{3}} + \frac {{\left (3 \, C a + A b\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{8 \, \sqrt {a b} a b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 4.87, size = 447, normalized size = 3.29 \begin {gather*} \left [\frac {12 \, D a^{4} - 4 \, B a^{3} b - 2 \, {\left (5 \, C a^{2} b^{2} - A a b^{3}\right )} x^{3} + 8 \, {\left (2 \, D a^{3} b - B a^{2} b^{2}\right )} x^{2} - {\left ({\left (3 \, C a b^{2} + A b^{3}\right )} x^{4} + 3 \, C a^{3} + A a^{2} b + 2 \, {\left (3 \, C a^{2} b + A a b^{2}\right )} x^{2}\right )} \sqrt {-a b} \log \left (\frac {b x^{2} - 2 \, \sqrt {-a b} x - a}{b x^{2} + a}\right ) - 2 \, {\left (3 \, C a^{3} b + A a^{2} b^{2}\right )} x + 8 \, {\left (D a^{2} b^{2} x^{4} + 2 \, D a^{3} b x^{2} + D a^{4}\right )} \log \left (b x^{2} + a\right )}{16 \, {\left (a^{2} b^{5} x^{4} + 2 \, a^{3} b^{4} x^{2} + a^{4} b^{3}\right )}}, \frac {6 \, D a^{4} - 2 \, B a^{3} b - {\left (5 \, C a^{2} b^{2} - A a b^{3}\right )} x^{3} + 4 \, {\left (2 \, D a^{3} b - B a^{2} b^{2}\right )} x^{2} + {\left ({\left (3 \, C a b^{2} + A b^{3}\right )} x^{4} + 3 \, C a^{3} + A a^{2} b + 2 \, {\left (3 \, C a^{2} b + A a b^{2}\right )} x^{2}\right )} \sqrt {a b} \arctan \left (\frac {\sqrt {a b} x}{a}\right ) - {\left (3 \, C a^{3} b + A a^{2} b^{2}\right )} x + 4 \, {\left (D a^{2} b^{2} x^{4} + 2 \, D a^{3} b x^{2} + D a^{4}\right )} \log \left (b x^{2} + a\right )}{8 \, {\left (a^{2} b^{5} x^{4} + 2 \, a^{3} b^{4} x^{2} + a^{4} b^{3}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 304 vs.
\(2 (119) = 238\).
time = 74.15, size = 304, normalized size = 2.24 \begin {gather*} \left (\frac {D}{2 b^{3}} - \frac {\sqrt {- a^{3} b^{7}} \left (A b + 3 C a\right )}{16 a^{3} b^{6}}\right ) \log {\left (x + \frac {- 8 D a^{2} + 16 a^{2} b^{3} \left (\frac {D}{2 b^{3}} - \frac {\sqrt {- a^{3} b^{7}} \left (A b + 3 C a\right )}{16 a^{3} b^{6}}\right )}{A b^{2} + 3 C a b} \right )} + \left (\frac {D}{2 b^{3}} + \frac {\sqrt {- a^{3} b^{7}} \left (A b + 3 C a\right )}{16 a^{3} b^{6}}\right ) \log {\left (x + \frac {- 8 D a^{2} + 16 a^{2} b^{3} \left (\frac {D}{2 b^{3}} + \frac {\sqrt {- a^{3} b^{7}} \left (A b + 3 C a\right )}{16 a^{3} b^{6}}\right )}{A b^{2} + 3 C a b} \right )} + \frac {- 2 B a^{2} b + 6 D a^{3} + x^{3} \left (A b^{3} - 5 C a b^{2}\right ) + x^{2} \left (- 4 B a b^{2} + 8 D a^{2} b\right ) + x \left (- A a b^{2} - 3 C a^{2} b\right )}{8 a^{3} b^{3} + 16 a^{2} b^{4} x^{2} + 8 a b^{5} x^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.13, size = 128, normalized size = 0.94 \begin {gather*} \frac {D \log \left (b x^{2} + a\right )}{2 \, b^{3}} + \frac {{\left (3 \, C a + A b\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{8 \, \sqrt {a b} a b^{2}} - \frac {{\left (5 \, C a b - A b^{2}\right )} x^{3} - 4 \, {\left (2 \, D a^{2} - B a b\right )} x^{2} + {\left (3 \, C a^{2} + A a b\right )} x - \frac {2 \, {\left (3 \, D a^{3} - B a^{2} b\right )}}{b}}{8 \, {\left (b x^{2} + a\right )}^{2} a b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.39, size = 195, normalized size = 1.43 \begin {gather*} \frac {\frac {A\,x^3}{8\,a}-\frac {A\,x}{8\,b}}{a^2+2\,a\,b\,x^2+b^2\,x^4}-\frac {\frac {B\,x^2}{2\,b}+\frac {B\,a}{4\,b^2}}{a^2+2\,a\,b\,x^2+b^2\,x^4}-\frac {\frac {5\,C\,x^3}{8\,b}+\frac {3\,C\,a\,x}{8\,b^2}}{a^2+2\,a\,b\,x^2+b^2\,x^4}+\frac {D\,\left (\ln \left (b\,x^2+a\right )+\frac {2\,a}{b\,x^2+a}-\frac {a^2}{2\,{\left (b\,x^2+a\right )}^2}\right )}{2\,b^3}+\frac {A\,\mathrm {atan}\left (\frac {\sqrt {b}\,x}{\sqrt {a}}\right )}{8\,a^{3/2}\,b^{3/2}}+\frac {3\,C\,\mathrm {atan}\left (\frac {\sqrt {b}\,x}{\sqrt {a}}\right )}{8\,\sqrt {a}\,b^{5/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________